package cn.itcast.crm.web.action;

import com.opensymphony.xwork2.ActionSupport;

import cn.itcast.crm.domain.CstCustomer;
import cn.itcast.crm.service.CustomerService;

//指定模型对象类型
public class CustomerAction extends ActionSupport {
	

	private Long custId;
	
	private CstCustomer cstCustomer;
	
	//注入service
	private CustomerService customerService;
	
	

	public Long getCustId() {
		return custId;
	}

	public void setCustId(Long custId) {
		this.custId = custId;
	}

	public CstCustomer getCstCustomer() {
		return cstCustomer;
	}

	public void setCstCustomer(CstCustomer cstCustomer) {
		this.cstCustomer = cstCustomer;
	}

	public CustomerService getCustomerService() {
		return customerService;
	}

	public void setCustomerService(CustomerService customerService) {
		this.customerService = customerService;
	}

		
	//根据主键查询
	public String findById(){
		
		cstCustomer = customerService.findCustomerById(custId);
		
		return "findById";
	}
	

}
